<?php
-/**
- * @package MediaWiki
- */
+if ( ! defined( 'MEDIAWIKI' ) )
+ die();
/**
- * This is not a valid entry point, perform no further processing unless MEDIAWIKI is defined
+ * @package MediaWiki
*/
-if( defined( 'MEDIAWIKI' ) ) {
-
/**
* Image gallery
- *
+ *
* Add images to the gallery using add(), then render that list to HTML using toHTML().
*
* @package MediaWiki
{
var $mImages, $mShowBytes, $mShowFilename;
- /**
+ /**
* Create a new image gallery object.
*/
function ImageGallery( ) {
/**
* Enable/Disable showing of the file size of an image in the gallery.
* Enabled by default.
- *
+ *
* @param boolean $f set to false to disable
*/
function setShowBytes( $f ) {
/**
* Enable/Disable showing of the filename of an image in the gallery.
* Enabled by default.
- *
+ *
* @param boolean $f set to false to disable
*/
function setShowFilename( $f ) {
/**
* Return a HTML representation of the image gallery
- *
+ *
* For each image in the gallery, display
* - a thumbnail
* - the image name
} else {
$nb = '';
}
-
+
$textlink = $this->mShowFilename ?
$sk->makeKnownLinkObj( $nt, htmlspecialchars( $wgLang->truncate( $nt->getText(), 20, '...' ) ) ) . "<br />\n" :
'' ;
$thumb = $img->getThumbnail( 120, 120 );
$vpad = floor( ( 150 - $thumb->height ) /2 ) - 2;
$s .= '<td><div class="gallerybox">' . '<div class="thumb" style="padding: ' . $vpad . 'px 0;">';
-
+
# ATTENTION: The newline after <div class="gallerytext"> is needed to accommodate htmltidy which
# in version 4.8.6 generated crackpot html in its absence, see:
# http://bugzilla.wikimedia.org/show_bug.cgi?id=1765 -Ævar
}
} //class
-
-
-
-
-} // defined( 'MEDIAWIKI' )
?>